//
//  LoadingCell.m
//  Everest
//
//  Created by Liu Chengbo on 14/12/20.
//  Copyright (c) 2014年 ThreeL. All rights reserved.
//

#import "LoadingCell.h"

@implementation LoadingCell
- (void)dealloc
{
    //    [_bigView release];
    [_titleLabel release];
    [_twoView release];
    [_byView release];
    [_byLabel release];
    [_nameLabel release];
    [_mView release];
    [_sizeLabel release];
    [_mLabel release];
    [_playImageView release];
    [_heartImageView release];
    [_talkImageView release];
    [_downImageView release];
    [_buildTimeImageView release];
    [_playLabel release];
    [_heartLabel release];
    [_talkLabel release];
    [_downLabel release];
    [_buildTimeLabel release];
    //    [_linkView release];
    [_playView release];
    [_heartView release];
    [_talkView release];
    [_downView release];
    [_buildTimeView release];
    [_fiveView release];
    [_bigImageView release];
    [_playButton release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //        self.bigView = [[UIImageView alloc] init];
        //        [self.contentView addSubview:self.bigView];
        //        self.bigView.backgroundColor = [UIColor blueColor];
        //        [self.bigView release];
        
        self.fiveView = [[UIView alloc] init];
        [self.contentView addSubview:self.fiveView];
        //        self.fiveView.backgroundColor = [UIColor cyanColor];
        [self.fiveView release];
        
        self.playView = [[UIView alloc] init];
        [self.fiveView addSubview:self.playView];
        //        self.playView.backgroundColor = [UIColor redColor];
        [self.playView release];
        
        self.playImageView = [[UIImageView alloc] init];
        [self.playView addSubview:self.playImageView];
        //        self.playImageView.backgroundColor = [UIColor blueColor];
        [self.playImageView release];
        
        self.playLabel = [[UILabel alloc] init];
        [self.playView addSubview:self.playLabel];
        //        self.playLabel.backgroundColor = [UIColor greenColor];
        [self.playLabel release];
        
        self.heartView = [[UIView alloc] init];
        [self.fiveView addSubview:self.heartView];
        //        self.heartView.backgroundColor = [UIColor orangeColor];
        [self.heartView release];
        
        self.heartImageView = [[UIImageView alloc] init];
        [self.heartView addSubview:self.heartImageView];
        //        self.heartImageView.backgroundColor = [UIColor blueColor];
        [self.heartImageView release];
        
        self.heartLabel = [[UILabel alloc] init];
        [self.heartView addSubview:self.heartLabel];
        //        self.heartLabel.backgroundColor = [UIColor greenColor];
        [self.heartLabel release];
        
        self.talkView = [[UIView alloc] init];
        [self.fiveView addSubview:self.talkView];
        [self.talkView release];
        
        self.talkImageView = [[UIImageView alloc] init];
        [self.talkView addSubview:self.talkImageView];
        [self.talkImageView release];
        
        self.talkLabel = [[UILabel alloc] init];
        [self.talkView addSubview:self.talkLabel];
        [self.talkLabel release];

        self.downView = [[UIView alloc] init];
        [self.fiveView addSubview:self.downView];
        [self.downView release];
        
        self.downImageView = [[UIImageView alloc] init];
        [self.downView addSubview:self.downImageView];
        [self.downImageView release];
        
        self.downLabel = [[UILabel alloc] init];
        [self.downView addSubview:self.downLabel];
        [self.downLabel release];
        
        self.buildTimeView = [[UIView alloc] init];
        [self.fiveView addSubview:self.buildTimeView];
        //        self.buildTimeView.backgroundColor = [UIColor yellowColor];
        [self.buildTimeView release];
        
        self.buildTimeImageView = [[UIImageView alloc] init];
        [self.buildTimeView addSubview:self.buildTimeImageView];
        //        self.buildTimeImageView.backgroundColor = [UIColor blueColor];
        [self.buildTimeImageView release];
        
        self.buildTimeLabel = [[UILabel alloc] init];
        [self.buildTimeView addSubview:self.buildTimeLabel];
        //        self.buildTimeLabel.backgroundColor = [UIColor greenColor];
        [self.buildTimeLabel release];
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
        //        self.titleLabel.backgroundColor = [UIColor blueColor];
        [self.titleLabel release];
        
        self.twoView = [[UIView alloc] init];
        [self.contentView addSubview:self.twoView];
        //        self.twoView.backgroundColor = [UIColor greenColor];
        [self.twoView release];
        
        self.byView = [[UIView alloc] init];
        [self.twoView addSubview:self.byView];
        //        self.byView.backgroundColor = [UIColor cyanColor];
        [self.byView release];
        
        self.byLabel = [[UILabel alloc] init];
        [self.byView addSubview:self.byLabel];
        //        self.byLabel.backgroundColor = [UIColor redColor];
        [self.byLabel release];
        
        self.nameLabel = [[UILabel alloc] init];
        [self.byView addSubview:self.nameLabel];
        //        self.nameLabel.backgroundColor = [UIColor orangeColor];
        [self.nameLabel release];
        
        self.mView = [[UIView alloc] init];
        [self.twoView addSubview:self.mView];
        //        self.mView.backgroundColor = [UIColor magentaColor];
        [self.mView release];
        
        self.sizeLabel = [[UILabel alloc] init];
        [self.mView addSubview:self.sizeLabel];
        //        self.sizeLabel.backgroundColor = [UIColor purpleColor];
        [self.sizeLabel release];
        
        self.mLabel = [[UILabel alloc] init];
        [self.mView addSubview:self.mLabel];
        //        self.mLabel.backgroundColor = [UIColor greenColor];
        [self.mLabel release];
        
        self.bigImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.bigImageView];
        //        self.bigImageView.backgroundColor = [UIColor grayColor];
        [self.bigImageView release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    //    NSLog(@"%.lf",kCellWidth);
    self.titleLabel.frame = CGRectMake(kCellWidth / 10, self.contentView.bounds.size.height / 10, kCellWidth / 30 * 17, 0);
    self.titleLabel.numberOfLines = 0;
    [self.titleLabel sizeToFit];
    
    // twoView
    self.twoView.frame = CGRectMake(kCellWidth / 10, self.titleLabel.bounds.size.height + 15, self.titleLabel.frame.size.width, 15);
    
    // By
    self.byView.frame = CGRectMake(0, 0, self.twoView.frame.size.width / 9 * 7, 15);
    
    self.byLabel.frame = CGRectMake(0, 0, self.byView.frame.size.width / 8 * 1, 15);
    self.byLabel.text = @"by";
    self.byLabel.font = [UIFont systemFontOfSize:13];
    self.byLabel.textColor = [UIColor grayColor];
    
    self.nameLabel.frame = CGRectMake(self.byView.frame.size.width / 8 * 1, 0, self.byView.frame.size.width / 8 * 7, 15);
    self.nameLabel.text = @"晚上十点晚上十点";
    self.nameLabel.font = [UIFont systemFontOfSize:13];
    self.nameLabel.textAlignment = NSTextAlignmentLeft;
    self.nameLabel.textColor = [UIColor grayColor];
    
    // M
    self.mView.frame = CGRectMake(self.twoView.frame.size.width / 9 * 7, 0, self.twoView.frame.size.width / 9 * 2, 15);
    
    self.sizeLabel.frame = CGRectMake(0, 0, self.mView.frame.size.width / 16 * 12, 15);
    self.sizeLabel.text = @"4.8";
    self.sizeLabel.font = [UIFont systemFontOfSize:12];
    self.sizeLabel.textColor = [UIColor grayColor];
    self.sizeLabel.textAlignment = NSTextAlignmentRight;
    
    self.mLabel.frame = CGRectMake(self.mView.frame.size.width / 16 * 12, 0, self.mView.frame.size.width / 16 * 4, 15);
    self.mLabel.text = @"M";
    self.mLabel.textColor = [UIColor grayColor];
    self.mLabel.font = [UIFont systemFontOfSize:12];
    
    // 五个小部件
    self.fiveView.frame = CGRectMake(kCellWidth / 10, self.titleLabel.bounds.size.height + 40, kCellWidth / 10 * 7, 15);
    
    self.playView.frame = CGRectMake(0, 0, self.fiveView.frame.size.width / 5, 15);
    self.playImageView.frame = CGRectMake(0, 0, self.playView.frame.size.width / 3, 15);
    self.playImageView.image = [UIImage imageNamed:@"iconfont-play.png"];
    self.playLabel.frame = CGRectMake(self.playView.frame.size.width / 3, 0, self.playView.frame.size.width / 3 * 2, 15);
    self.playLabel.text = @"1111";
    self.playLabel.font = [UIFont systemFontOfSize:11];
    
    self.heartView.frame = CGRectMake(self.fiveView.frame.size.width / 5, 0, self.fiveView.frame.size.width / 5, 15);
    self.heartImageView.frame = CGRectMake(0, 0, self.heartView.frame.size.width / 3, 15);
    self.heartImageView.image = [UIImage imageNamed:@"iconfont-heart.png"];
    self.heartLabel.frame = CGRectMake(self.heartView.frame.size.width / 3, 0, self.heartView.frame.size.width / 3 * 2, 15);
    self.heartLabel.text = @"1234";
    self.heartLabel.font = [UIFont systemFontOfSize:11];
    
    self.talkView.frame = CGRectMake(self.fiveView.frame.size.width / 5 * 2, 0, self.fiveView.frame.size.width / 5, 15);
    self.talkImageView.frame = CGRectMake(0, 0, self.talkView.frame.size.width / 3, 15);
    self.talkImageView.image = [UIImage imageNamed:@"iconfont-pinglun.png"];
    self.talkLabel.frame = CGRectMake(self.talkView.frame.size.width / 3, 0, self.talkView.frame.size.width / 3 * 2, 15);
    self.talkLabel.text = @"112";
    self.talkLabel.font = [UIFont systemFontOfSize:11];
    
    self.downView.frame = CGRectMake(self.fiveView.frame.size.width / 5 * 3, 0, self.fiveView.frame.size.width / 5, 15);
    self.downImageView.frame = CGRectMake(0, 0, self.downView.frame.size.width / 4, 15);
    self.downImageView.image = [UIImage imageNamed:@"iconfont-xiaxiazai.png"];
    self.downLabel.frame = CGRectMake(self.downView.frame.size.width / 3, 0, self.downView.frame.size.width / 3 * 2, 15);
    self.downLabel.text = @"49";
    self.downLabel.font = [UIFont systemFontOfSize:11];
    
    self.buildTimeView.frame = CGRectMake(self.fiveView.frame.size.width / 5 * 4, 0, self.fiveView.frame.size.width / 5, 15);
    self.buildTimeImageView.frame = CGRectMake(0, 0, self.buildTimeView.frame.size.width / 3, 15);
    self.buildTimeImageView.image = [UIImage imageNamed:@"iconfont-shijiantime.png"];
    self.buildTimeLabel.frame = CGRectMake(self.buildTimeView.frame.size.width / 3, 0, self.buildTimeView.frame.size.width / 3 * 2, 15);
    self.buildTimeLabel.text = @"14:50";
    self.buildTimeLabel.font = [UIFont systemFontOfSize:11];
    
    self.bigImageView.frame = CGRectMake(kCellWidth / 32 * 21, self.contentView.bounds.size.height / 92 * 9, 70, 70);
    self.bigImageView.image = [UIImage imageNamed:@"Photo_1117_3a_meitu_1.jpg"];
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
